package com.ruoyi.article.domain;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 评论对象 z_article_review
 * 
 * @author ruoyi
 * @date 2024-12-02
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ZArticleReview
{
    private static final long serialVersionUID = 1L;

    /** 评论id */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 评论文章id */
    @Excel(name = "评论文章id")
    private Long contentId;

    /** 父评论记录id */
    @Excel(name = "父评论记录id")
    private Long parentId;

    /** 评论用户id */
    @Excel(name = "评论用户id")
    private Long userId;

    /** 评论用户姓名 */
    @Excel(name = "评论用户姓名")
    private String userName;

    /** 评论内容 */
    @Excel(name = "评论内容")
    private String commentDetails;

    /** 评论日期 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "评论日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date commentDate;

    /** 评论标识（1作者，2普通用户） */
    @Excel(name = "评论标识", readConverterExp = "1=作者，2普通用户")
    private Long contentFlag;

    /** 点赞数 */
    @Excel(name = "点赞数")
    private Long likeNum;

    /** 回复评论id */
    @Excel(name = "回复评论id")
    private Long replyCommentId;

    /** 回复用户id */
    @Excel(name = "回复用户id")
    private Long replyUserId;

    /** 回复用户姓名 */
    @Excel(name = "回复用户姓名")
    private String replyUserName;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    @TableField(exist = false)
    private List<ZArticleReview> children;

    @TableField(exist = false)
    private int pageSize = 10;//每页大小

    @TableField(exist = false)
    private int pageCurrent = 1;

    @TableField(exist = false)
    private String userImg;

    //-1表示此评论没有被点赞，1表示已经被点赞
    @TableField(exist = false)
    private Integer status = -1;

}
